<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
  <meta charset="utf-8">
  <title>cat writebug.cn/history</title>
  <meta name="author" content="zhiliao">
  <meta name="description" content="writebug博客网，一个开发者的技术博客。" />

  <meta name="keywords" content="开发者,程序,博客园,程序猿,程序媛,极客,码农,编程,代码,软件开发,开源,IT网站,技术社区,Developer,Programmer,Coder,Geek,Coding,Code,writebug,bug,写bug,linux,vim,编程语言,调试" />

  <link href="/feeds/all.atom.xml" type="application/rss+xml" rel="alternate"
        title="cat writebug.cn/history RSS Feed" />



  <!-- http://t.co/dKP3o1e -->
  <meta name="HandheldFriendly" content="True">
  <meta name="MobileOptimized" content="320">
  <meta name="viewport" content="width=device-width, initial-scale=1">


    <link href="/favicon.png" rel="icon">

  <link href="/theme/css/main.css" media="screen, projection"
        rel="stylesheet" type="text/css">
  <link href="/theme/css/pygment.css" rel="stylesheet" type="text/css">

  <!--
  <link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic"
        rel="stylesheet" type="text/css">
  <link href="//fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic"
        rel="stylesheet" type="text/css">
  -->


  <script src="/theme/js/modernizr-2.0.js"></script>
  <script src="/theme/js/ender.js"></script>
  <script src="/theme/js/octopress.js" type="text/javascript"></script>
</head>

<body >
  <header role="banner"
  >
<hgroup>
  <h1><a href="/">cat writebug.cn/history</a></h1>
    <h2>一个开发者的技术博客。</h2>
</hgroup></header>
  <nav role="navigation"><ul class="subscription" data-subscription="rss">
  <li><a href="/feeds/all.atom.xml" rel="subscribe-rss">RSS</a></li>
</ul>


<ul class="main-navigation">
    <li><a href="/">Home</a></li>
    <li><a href="/archives.html">Archive</a></li>
    <li><a href="/pages/todolist.html">TodoList</a></li>
    <li><a href="/pages/about.html">About</a></li>
</ul></nav>
  <div id="main">
    <div id="content">
<div class="blog-index">
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/07/05/pkexec.html">pkexec</a>
      </h1>
    <p class="meta">
<time datetime="2022-07-05T13:26:03+08:00" pubdate>2022-07-05 13:26:03</time>      
    </p>
</header>

        <div class="entry-content"><p>可以使用pkexec代替gksu 和 sudo</p>
<blockquote>
<p>pkexec bash</p>
</blockquote></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/07/04/qt-creator-qDebug.html">解决linux下Qt creator不显示qDebug输出</a>
      </h1>
    <p class="meta">
<time datetime="2022-07-04T18:50:55+08:00" pubdate>2022-07-04 18:50:55</time>      
    </p>
</header>

        <div class="entry-content"><p>linux下Qt creator 不显示qDebug输出， 可以在qtcreator的.desktop文件添加环境变量。
<code>env QT_ASSUME_STDERR_HAS_CONSOLE=1 qtcreator</code></p>
<hr>
<p>源代码原编写于Windows系统中，迁移到Linux上后使 …</p></div>
            <footer>
                <a rel="full-article" href="/posts/2022/07/04/qt-creator-qDebug.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/07/02/cannot-open-shared-libraries.html">openSUSE系统报告无法打开动态库</a>
      </h1>
    <p class="meta">
<time datetime="2022-07-02T18:29:06+08:00" pubdate>2022-07-02 18:29:06</time>      
    </p>
</header>

        <div class="entry-content"><p>更新openSUSE 15.4, 发现 qtcreator 挂了。</p>
<div class="highlight-custom"><pre><span></span><code>~&gt;<span class="w"> </span>qtcreator<span class="w"> </span>
qtcreator:<span class="w"> </span>error<span class="w"> </span><span class="k">while</span><span class="w"> </span>loading<span class="w"> </span>shared<span class="w"> </span>libraries:<span class="w"> </span>libExtensionSystem.so.6:<span class="w"> </span>cannot<span class="w"> </span>open<span class="w"> </span>shared<span class="w"> </span>object<span class="w"> </span>file:<span class="w"> </span>No<span class="w"> </span>such<span class="w"> </span>file<span class="w"> </span>or<span class="w"> </span>directory
</code></pre></div>

<p>最终还是在系统里找到了这个文件</p>
<div class="highlight-custom"><pre><span></span><code>~&gt; zypper search -f libExtensionSystem.so …</code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2022/07/02/cannot-open-shared-libraries.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/07/02/thirdparty-repos.html">自己用的三方软件仓库</a>
      </h1>
    <p class="meta">
<time datetime="2022-07-02T14:30:25+08:00" pubdate>2022-07-02 14:30:25</time>      
    </p>
</header>

        <div class="entry-content"><ol>
<li>openSUSE, packman</li>
<li>fedora, rpmfusion</li>
<li>centos, EPEL, ius, ELRepo(不常用)，</li>
</ol>
<p><a href="rpmfusion">https://rpmfusion.org/</a></p>
<p><a href="EPEL">https://fedoraproject.org/wiki/EPEL/zh-cn</a></p>
<p><a href="ius">https://ius.io/</a></p>
<p><a href="RLRepo硬件相关软件包">http://elrepo.org/tiki/HomePage</a></p></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/06/29/cloc.html">统计代码行数cloc (count lines of code)</a>
      </h1>
    <p class="meta">
<time datetime="2022-06-29T17:17:17+08:00" pubdate>2022-06-29 17:17:17</time>      
    </p>
</header>

        <div class="entry-content"><p>统计代码行数可以使用cloc，gocloc</p>
<h4>使用cloc</h4>
<div class="highlight-custom"><pre><span></span><code>apt<span class="w"> </span>install<span class="w"> </span>cloc
cloc<span class="w"> </span>.
cloc<span class="w"> </span>xxx-source.tar.gz
</code></pre></div>

<h4>使用gocloc</h4>
<div class="highlight-custom"><pre><span></span><code><span class="c1"># https://github.com/hhatto/gocloc</span>
gocloc<span class="w"> </span>.
</code></pre></div></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/06/27/snapper.html">snapper文件系统快照工具</a>
      </h1>
    <p class="meta">
<time datetime="2022-06-27T19:26:08+08:00" pubdate>2022-06-27 19:26:08</time>      
    </p>
</header>

        <div class="entry-content"><h5>snapper 支持的文件系统</h5>
<ol>
<li>btrfs</li>
<li>XFS、Ext4 或 Ext3 格式的精简 LVM 卷</li>
</ol>
<p>命令参考</p>
<div class="highlight-custom"><pre><span></span><code>snapper<span class="w"> </span>list<span class="w"> </span><span class="c1"># 查看快照</span>
snapper<span class="w"> </span>statu<span class="w">  </span>PRE..POST<span class="w"> </span><span class="c1">#命令以获取快照对的已更改文件列表 …</span></code></pre></div></div>
            <footer>
                <a rel="full-article" href="/posts/2022/06/27/snapper.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/04/22/Xwindow-utility.html">Xwindow utility</a>
      </h1>
    <p class="meta">
<time datetime="2022-04-22T15:46:38+08:00" pubdate>2022-04-22 15:46:38</time>      
    </p>
</header>

        <div class="entry-content"><p>xwininfo 
xprop </p>
<p>Xwininfo is a utility for displaying information about windows.
The xprop utility is for displaying window and font properties in an X server. </p></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/04/11/about-qt.html">关于Qt</a>
      </h1>
    <p class="meta">
<time datetime="2022-04-11T14:48:07+08:00" pubdate>2022-04-11 14:48:07</time>      
    </p>
</header>

        <div class="entry-content"><p>QString转char*的正确方法</p>
<div class="highlight-custom"><pre><span></span><code><span class="n">QString</span><span class="p">()</span><span class="o">.</span><span class="n">toLocal8Bit</span><span class="p">()</span><span class="o">.</span><span class="n">constData</span><span class="p">()</span>
<span class="n">QString</span><span class="p">()</span><span class="o">.</span><span class="n">toUtf8</span><span class="p">()</span><span class="o">.</span><span class="n">constData</span><span class="p">()</span>
</code></pre></div></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/03/31/vscode-proxy.html">vscode 使用代理安装扩展</a>
      </h1>
    <p class="meta">
<time datetime="2022-03-31T10:06:16+08:00" pubdate>2022-03-31 10:06:16</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code>code<span class="w"> </span>--proxy-server<span class="o">=</span><span class="m">127</span>.0.0.1:1080
</code></pre></div></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/03/08/go-callvis.html">go生成函数调用关系图</a>
      </h1>
    <p class="meta">
<time datetime="2022-03-08T11:46:01+08:00" pubdate>2022-03-08 11:46:01</time>      
    </p>
</header>

        <div class="entry-content"><p>go生成函数调用关系图</p>
<div class="highlight-custom"><pre><span></span><code>~/go/bin/go-callvis<span class="w"> </span>-nostd<span class="w">  </span>-group<span class="w"> </span>pkg,type<span class="w"> </span>.
<span class="c1"># 会自动打开浏览器localhost:7878</span>
</code></pre></div></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/02/24/xdg-user-dirs.html">xdg-user-dirs使用英文名称</a>
      </h1>
    <p class="meta">
<time datetime="2022-02-24T11:44:53+08:00" pubdate>2022-02-24 11:44:53</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code># 中文语言环境下，xdg-user-dirs使用英文名称
LANG=C xdg-user-dirs-gtk-update # 同意更新
xdg-user-dirs-gtk-update # 保留且不再询问
</code></pre></div></div>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2022/01/04/linux-dns.html">Linux DNS缓存</a>
      </h1>
    <p class="meta">
<time datetime="2022-01-04T00:34:54+08:00" pubdate>2022-01-04 00:34:54</time>      
    </p>
</header>

        <div class="entry-content"><ol>
<li>nscd (为glibc提供缓存, 支持glibc 的 getaddrinfo(3), gethostbyname(3) 等相关API)</li>
<li>systemd-resolved (1. 通过D-Bus服务提供dns缓存 2. 为glibc提供缓存 3. 在本地回环网口 127.0.0.53 …</li></ol></div>
            <footer>
                <a rel="full-article" href="/posts/2022/01/04/linux-dns.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2021/08/17/uart-tty.html">uart登录显示颜色支持分屏</a>
      </h1>
    <p class="meta">
<time datetime="2021-08-17T18:25:03+08:00" pubdate>2021-08-17 18:25:03</time>      
    </p>
</header>

        <div class="entry-content"><p>使用minicom登录的时候，远程终端窗口大小和本地窗口不一致。 远程窗口小不好用。</p>
<p>经测试可以用 <code>sudo screen /dev/ttyUSB0 115200</code> 来登录， 登录后使 …</p></div>
            <footer>
                <a rel="full-article" href="/posts/2021/08/17/uart-tty.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2021/08/16/iproute2.html">iproute2</a>
      </h1>
    <p class="meta">
<time datetime="2021-08-16T00:00:00+08:00" pubdate>2021-08-16 00:00:00</time>      
    </p>
</header>

        <div class="entry-content"><h2>macvlan</h2>
<p><code>ip link add link eth0 name macvlan0 type macvlan mode bridge</code></p>
<p><code>ip link delete macvlan0</code></p>
<ol>
<li>实测必须在eth0 up的情况下， macvlan才工作</li>
<li>实测debian 10 (buster)，macvlan下 dhcpcd 8.1.2不能正常工作， isc-dhclient-4.4 …</li></ol></div>
            <footer>
                <a rel="full-article" href="/posts/2021/08/16/iproute2.html">Read On &crarr;</a>
            </footer>
  		</article>
  		<article>
<header>
      <h1 class="entry-title">
        <a href="/posts/2021/08/01/thd.html">树莓派中开机时检测案件是否按下</a>
      </h1>
    <p class="meta">
<time datetime="2021-08-01T15:16:55+08:00" pubdate>2021-08-01 15:16:55</time>      
    </p>
</header>

        <div class="entry-content"><div class="highlight-custom"><pre><span></span><code><span class="c1"># 记录一下此用法。 thd来自 debian 软件包 triggerhappy</span>
<span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span>-x<span class="w"> </span>/usr/sbin/thd<span class="w"> </span><span class="o">]</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span>timeout<span class="w"> </span><span class="m">1</span><span class="w"> </span>thd<span class="w"> </span>--dump<span class="w"> </span>/dev/input/event*<span class="w"> </span><span class="p">|</span><span class="w"> </span>grep<span class="w"> </span>-q<span class="w"> </span><span class="s2">&quot;LEFTSHIFT\|RIGHTSHIFT&quot;</span><span class="p">;</span><span class="w"> </span><span class="k">then</span>
<span class="w">      </span><span class="nb">printf</span><span class="w"> </span><span class="s2">&quot;xxxxxxxx&quot;</span><span class="w"> </span>
<span class="k">fi</span>
</code></pre></div></div>
  		</article>
<div class="pagination">
    <a class="prev" href="/index3.html">&larr; Older</a>

    <a class="next" href="/index.html">Newer &rarr;</a>
  <br />
</div></div>

<aside class="sidebar">
<section>
  <h1>Recent Posts</h1>
  <ul id="recent_posts">
    <li class="post">
        <a href="/posts/2023/08/22/bash-conversion.html">bash进制转换</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/16/remap-caps-ctrl.html">在Linux下交换Ctrl与大写锁定键</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/15/learn-java.html">java入门精粹</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/04/tcl-expect.html">Tcl 和 expect教程</a>
    </li>
    <li class="post">
        <a href="/posts/2023/08/01/armbian-config-software.html">armbian-config 支持自动安装的软件</a>
    </li>
  </ul>
</section><section>
  <h1>Categories</h1>
    <ul id="recent_posts">
      <li><a href="/category/android.html">android (2)</a></li>
      <li><a href="/category/blog.html">blog (1)</a></li>
      <li><a href="/category/bootloader.html">bootloader (2)</a></li>
      <li><a href="/category/container.html">container (1)</a></li>
      <li><a href="/category/database.html">database (1)</a></li>
      <li><a href="/category/editor.html">editor (4)</a></li>
      <li><a href="/category/filesystem.html">filesystem (1)</a></li>
      <li><a href="/category/firefox.html">firefox (1)</a></li>
      <li><a href="/category/git.html">git (4)</a></li>
      <li><a href="/category/golang.html">golang (1)</a></li>
      <li><a href="/category/gu-piao.html">股票 (1)</a></li>
      <li><a href="/category/ide.html">IDE (1)</a></li>
      <li><a href="/category/interview.html">interview (1)</a></li>
      <li><a href="/category/linux.html">linux (51)</a></li>
      <li><a href="/category/network.html">network (7)</a></li>
      <li><a href="/category/nltk.html">nltk (2)</a></li>
      <li><a href="/category/notes.html">notes (1)</a></li>
      <li><a href="/category/other.html">other (1)</a></li>
      <li><a href="/category/programming.html">programming (10)</a></li>
      <li><a href="/category/python.html">python (1)</a></li>
      <li><a href="/category/software.html">software (1)</a></li>
      <li><a href="/category/stock.html">stock (1)</a></li>
      <li><a href="/category/storage.html">storage (2)</a></li>
      <li><a href="/category/vm.html">vm (1)</a></li>
      <li><a href="/category/web.html">web (4)</a></li>
      <li><a href="/category/windows.html">windows (1)</a></li>
      <li><a href="/category/xwindow.html">xwindow (1)</a></li>
  </ul>
</section>
<section>
  <h1>Tags</h1>
    <a href="/tag/linux.html">linux</a>,    <a href="/tag/bash.html">bash</a>,    <a href="/tag/xwindow.html">Xwindow</a>,    <a href="/tag/programming-language.html">programming-language</a>,    <a href="/tag/java.html">java</a>,    <a href="/tag/programming.html">programming</a>,    <a href="/tag/software.html">software</a>,    <a href="/tag/storage.html">storage</a>,    <a href="/tag/debug.html">debug</a>,    <a href="/tag/c.html">C</a>,    <a href="/tag/git.html">git</a>,    <a href="/tag/patch.html">patch</a>,    <a href="/tag/text.html">text</a>,    <a href="/tag/selenium.html">selenium</a>,    <a href="/tag/web.html">web</a>,    <a href="/tag/docker.html">docker</a>,    <a href="/tag/flatpak.html">flatpak</a>,    <a href="/tag/interview.html">interview</a>,    <a href="/tag/qt.html">Qt</a>,    <a href="/tag/opensuse.html">openSUSE</a>,    <a href="/tag/filesystem.html">filesystem</a>,    <a href="/tag/ide.html">IDE</a>,    <a href="/tag/glang.html">glang</a>,    <a href="/tag/xdg.html">xdg</a>,    <a href="/tag/network.html">network</a>,    <a href="/tag/raspberry.html">raspberry</a>,    <a href="/tag/vm.html">vm</a>,    <a href="/tag/windows.html">windows</a>,    <a href="/tag/gdb.html">gdb</a>,    <a href="/tag/debian.html">debian</a>,    <a href="/tag/archlinux.html">archlinux</a>,    <a href="/tag/phicomm.html">phicomm</a>,    <a href="/tag/kernel.html">kernel</a>,    <a href="/tag/ext4.html">ext4</a>,    <a href="/tag/server.html">server</a>,    <a href="/tag/stock.html">stock</a>,    <a href="/tag/shu.html">书</a>,    <a href="/tag/gu-piao.html">股票</a>,    <a href="/tag/python.html">python</a>,    <a href="/tag/nltk.html">nltk</a>,    <a href="/tag/command.html">command</a>,    <a href="/tag/shell.html">shell</a>,    <a href="/tag/terminal.html">terminal</a>,    <a href="/tag/other.html">other</a>,    <a href="/tag/wireless.html">wireless</a>,    <a href="/tag/android.html">android</a>,    <a href="/tag/gtk.html">gtk+</a>,    <a href="/tag/gnome.html">gnome</a>,    <a href="/tag/keyboard.html">keyboard</a>,    <a href="/tag/firefox.html">firefox</a>,    <a href="/tag/arch.html">arch</a>,    <a href="/tag/database.html">database</a>,    <a href="/tag/mysql.html">mysql</a>,    <a href="/tag/notes.html">notes</a>,    <a href="/tag/sysctl.html">sysctl</a>,    <a href="/tag/vim.html">vim</a>,    <a href="/tag/editor.html">editor</a>,    <a href="/tag/pelican.html">pelican</a>,    <a href="/tag/blog.html">blog</a>,    <a href="/tag/book.html">book</a>,    <a href="/tag/bootloader.html">bootloader</a></section>
    <section>
        <h1>Social</h1>
        <ul>
            <li><a href="https://github.com/zhangjiaxing" target="_blank">github</a></li>
            <li><a href="http://wpa.qq.com/msgrd?v=3&uin=347820393&site=qq&menu=yes" target="_blank">qq</a></li>
            <li><a href="http://www.writebug.cn" target="_blank">blog</a></li>
            <li><a href="http://gallery.writebug.cn" target="_blank">gallery</a></li>
        </ul>
    </section>
    <section>
        <h1>Blogroll</h1>
        <ul>
            <li><a href="http://getpelican.com/" target="_blank">Pelican</a></li>
        </ul>
    </section>

</aside>
    </div>
  </div>
  <footer role="contentinfo">
<p>
    Copyright &copy;  2013&ndash;2023  zhiliao &mdash;
  <span class="credit">Powered by <a href="http://getpelican.com">Pelican</a></span>
</p>  </footer>
</body>
</html>